package com.ss.android.article.base.feature.detail2.widget;

import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.ss.android.common.lib.MobClickCombiner;

public class SerialCatalogView extends RelativeLayout {
    public TextView mPreChapterTv;
    public TextView mNextChapterTv;
    public TextView mCatalogTv;
    public View mCatalogDividerView;

    public SerialCatalogView(Context arg1) {
        super(arg1);
        this.init();
    }

    public SerialCatalogView(Context arg1, AttributeSet arg2) {
        super(arg1, arg2);
        this.init();
    }

    public SerialCatalogView(Context arg1, AttributeSet arg2, int arg3) {
        super(arg1, arg2, arg3);
        this.init();
    }

    @TargetApi(value = 21)
    public SerialCatalogView(Context arg1, AttributeSet arg2, int arg3, int arg4) {
        super(arg1, arg2, arg3, arg4);
        this.init();
    }

    private void init() {
        LayoutInflater.from(this.getContext()).inflate(com.ss.android.article.browser.R.layout.serial_catalog_layout, ((ViewGroup) this));
        this.mPreChapterTv = this.findViewById(com.ss.android.article.browser.R.id.txt_pre_chapter);
        this.mNextChapterTv = this.findViewById(com.ss.android.article.browser.R.id.txt_next_chapter);
        this.mCatalogTv = this.findViewById(com.ss.android.article.browser.R.id.txt_catalog);
        this.mCatalogDividerView = this.findViewById(com.ss.android.article.browser.R.id.catalog_divider);
        this.setBackgroundColor(this.getResources().getColor(com.ss.android.article.browser.R.color.ssxinmian4));
        this.setOnTouchListener(new View.OnTouchListener() {
            public final boolean onTouch(View view, MotionEvent motionEvent) {
                return true;
            }
        });
    }

    public final void onEvent(String event, long itemId, long articleGroupItemId) {
        MobClickCombiner.onEvent(this.getContext(), "detail", event, itemId, articleGroupItemId);
    }
}

